package log

func init() {
	var tops = []TeeOption{
		{
			Filename: "log/debug.log",
			Ropt: RotateOptions{
				MaxSize:    5, // MB
				MaxAge:     3, // days
				MaxBackups: 5,
				Compress:   true,
			},
			Lef: func(lvl Level) bool {
				return lvl <= DebugLevel
			},
		},
		{
			Filename: "log/info.log",
			Ropt: RotateOptions{
				MaxSize:    5, // MB
				MaxAge:     3, // days
				MaxBackups: 5,
				Compress:   true,
			},
			Lef: func(lvl Level) bool {
				return lvl <= InfoLevel && lvl > DebugLevel
			},
		},
		{
			Filename: "log/error.log",
			Ropt: RotateOptions{
				MaxSize:    5,
				MaxAge:     3,
				MaxBackups: 5,
				Compress:   true,
			},
			Lef: func(lvl Level) bool {
				return lvl > InfoLevel
			},
		},
	}

	logger := NewTeeWithRotate(tops)
	ResetDefault(logger)
}
